-- WIP
function widget:GetInfo()
	return {
		name    = 'Main Menu API? examples',
		desc    = 'Some examples of how to add options (and eventually tabs) to Funks Main Menu',
		author  = 'Funkencool',
		date    = '2014',
		license = 'GNU GPL v2',
		layer   = 0,
		enabled = true
	}
end

local Chili
local Menu

local function change(obj)
	Spring.Echo(obj.caption..' Toggled')
end

function widget:Initialize()
	
	Chili = WG.Chili
	Menu  = WG.MainMenu
	
	local widgetOptions = Chili.Control:New{
		x        = 0,
		width    = '100%',
		height   = 70,
		padding  = {0,0,0,0},
		children = {
			Chili.Label:New{caption='Widget Option Example',x=0,y=0},
			Chili.Checkbox:New{caption='Setting 1:',width = 80,y=15,right=0,checked=false,OnChange = {change}},
			Chili.Checkbox:New{caption='Setting 2:',width = 80,y=30,right=0,checked=false,OnChange = {change}},
			Chili.Checkbox:New{caption='Setting 3:',width = 80,y=45,right=0,checked=false,OnChange = {change}},
			Chili.Line:New{y=60,width='100%'}
		}
	}
	
	
	Menu.AddToStack('Graphics', widgetOptions)
	
end
